/**
 * @license
 * Copyright 2018 Google Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* Common colors used in more than one category. */
$appsBackgroundColor:     #D93025;
$unityBackgroundColor:    #5F6368;
$webBackgroundColor:      #1A73E8;
/* Common icons used in more than one category. */
$webIcon: 'web.svg';

/* Mixins. */
@mixin colorize-card($name, $color, $icon:false) {
    .#{$name}-bg {
      background-color: $color;
    }

    .#{$name}-icon {
      @if $icon {
        background-image: url(//codelabs.developers.google.com/images/icons/#{$icon});
      } @else {
        opacity: 0;
      }
    }
    
    google-codelab-index-cards .card .#{$name}-start {
      color: $color;
        &:hover, 
        &:active {
          background: rgba($color, 0.1);
        }
    }    
}

@include colorize-card('default', #5F6368);
@include colorize-card('about', #9AA0A6, 'google_g.svg');
@include colorize-card('ads', #188038, 'ads.png');
@include colorize-card('analytics', #E37400, 'analytics.png');
@include colorize-card('android', #71B958, 'android.svg');
@include colorize-card('android-auto', #71B958, 'android.svg');
@include colorize-card('android-tv', #71B958, 'android.svg');
@include colorize-card('android-wear', #71B958, 'android.svg');
@include colorize-card('android-things', #4B830D, 'android-things.svg');
@include colorize-card('apps', $appsBackgroundColor, 'apps.png');
@include colorize-card('assistant', $webBackgroundColor, 'assistant.png');
@include colorize-card('blockly', #A142FA, 'blockly.png');
@include colorize-card('brillo', $webBackgroundColor, 'brillo.png');
@include colorize-card('cast', #5F6368, 'cast.png');
@include colorize-card('chrome', $webBackgroundColor, 'chrome.svg');
@include colorize-card('cloud', $webBackgroundColor, 'cloud.png');
@include colorize-card('cloud-about', $webBackgroundColor, 'cloud.png');
@include colorize-card('cloud-app-engine', $webBackgroundColor, 'appengine.png');
@include colorize-card('cloud-appengine', $webBackgroundColor, 'appengine.png');
@include colorize-card('cloud-cloud-tools', $webBackgroundColor, 'cloud.png');
@include colorize-card('cloud-compute', $webBackgroundColor, 'cloud-compute.png');
@include colorize-card('cloud-data', $webBackgroundColor, 'cloud-data.png');
@include colorize-card('cloud-general', $webBackgroundColor, 'cloud.png');
@include colorize-card('cloud-machine-learning', $webBackgroundColor, 'cloud-ml.png');
@include colorize-card('cloud-mobile', $webBackgroundColor, 'cloud-mobile.png');
@include colorize-card('cloud-monitoring', $webBackgroundColor, 'cloud-monitoring.png');
@include colorize-card('cloud-networking', $webBackgroundColor, 'cloud-networking.png');
@include colorize-card('cloud-others', $webBackgroundColor, 'cloud.png');
@include colorize-card('cloud-security', $webBackgroundColor, 'cloud-security.png');
@include colorize-card('cloud-web', $webBackgroundColor, $webIcon);
@include colorize-card('design', #212121, 'design.svg');
@include colorize-card('firebase', #E37400, 'firebase.png');
@include colorize-card('firebase-web', $webBackgroundColor, $webIcon);
@include colorize-card('flutter', #02569B, 'flutter.png');
@include colorize-card('games', #A142FA, 'cardboard.png');
@include colorize-card('iot', $unityBackgroundColor, 'iot.svg');
@include colorize-card('nest', #5F6368, 'nest.png');
@include colorize-card('openthread', #174EA6, 'openthread.png');
@include colorize-card('play-games', #A142FA, 'cardboard.png');
@include colorize-card('geo', $webBackgroundColor, 'geo.png');
@include colorize-card('search', $webBackgroundColor, 'google_g.svg');
@include colorize-card('sheets', $appsBackgroundColor, 'sheets.png');
@include colorize-card('tensorflow', #E37400, 'tensorflow.png');
@include colorize-card('unity', $unityBackgroundColor, 'unity.png');
@include colorize-card('vr', #A142FA, 'cardboard.png');
@include colorize-card('virtual-reality', #A142FA, 'vr.svg');
@include colorize-card('weave', #188038, 'weave.svg');
@include colorize-card('web', $webBackgroundColor, $webIcon);
